// Render Context
// (c) jimon game studio

#ifndef JEH_IRENDERCONTEXT
#define JEH_IRENDERCONTEXT

#include "jeUnknown.h"
#include "IWindow.h"

namespace je
{
	namespace video
	{
		//! Render Context
		class IRenderContext:public je::jeUnknown
		{
		public:
			//! Init Use Of Context
			virtual void InitContext() = 0;

			//! DeInit Use Of Context
			virtual void DeInitContext() = 0;

			//! Set Window
			virtual void SetWindow(device::IWindow * Window) = 0;

			//! Get current render window
			virtual device::IWindow * GetWindow() = 0;

			//! Set Viewport Size
			virtual void SetSize(const jeVector2di & Size) = 0;

			//! Get Viewport Size
			virtual const jeVector2di & GetSize() = 0;

			//! If true, render context use full window client space
			virtual void SetFullWindowUse(u1 Use) = 0;

			//! return fullwindowuse flag
			virtual u1 IsFullWindowUse() = 0;

			//! Set VSync Flag
			virtual void SetVSyncFlag(u1 Flag) = 0;

			//! Return VSync Flag
			virtual u1 GetVSyncFlag() = 0;

			//! Render Context Get Api Pointer Type
			enum RenderContextApiPointerType
			{
				//! Windows Device Context Pointer
				RCAPT_HDC,

				//! Windows OpenGL Render Context Pointer
				RCAPT_HGLRC,

				//! Linux X Opengl Context
				RCAPT_XCONTEXT
			};

			//! Get Api Pointer
			virtual void * GetApiPointer(RenderContextApiPointerType Type) = 0;
		};
	}
}

#endif
